#{extends 'main.html' /} #{set title:'Home' /}
#{set 'moreScripts'} 

<script type="text/javascript" src="@{'/public/javascripts/jquery-latest.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/jquery.tablesorter.js'}"></script>

<script type="text/javascript">
	$(function() {		
		$("#searchResults").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});
		$("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter: false}, 4:{sorter: false}}});
	});	
	</script>
	#{/set}
<div id=main>


<br/> <a class="buttonS purple" href="@{AdvancedSearch.searchHome()}">Back to advanced search </a><br/>

	<h1>Tag Advanced Search Results</h1>
	Found ${results.tags.size()} tag${results.tags.size().pluralize()}
	matching your search. Showing tags ${((page-1)*20)+1} to
	${((page-1)*20) + results.tags.size()}. #{if results.count > 20}
	<p>
		#{if page > 1} <a href="@{Application.searchForTag(search, page-1)}">
			<<< Previous </a> || #{/if} #{if page*20 <= results.count} <a
			href="@{Application.searchForTag(search, page+1)}"> Next </a>
		#{/if}#{/if}
	</p>
	<table id="searchResults" cellpadding="8" class="tablesorter"  align="left">
		<thead>
						
						<tr>
							<th width="100px"><u>Name</u></th>
						</tr>
</thead>
<tbody>
		#{list items:listTag, as:'Tag'}
						<tr>
						<td><a href="@{Application.showTag(Tag.id)}">${Tag.name} </a>
			</td>

						</tr>
						#{/list} #{else} Sorry! We did not find any results matching
		'${search}' #{/else}
</tbody>
</table>
<div style="clear:both;"></div>
</div>
